package data_test;

import mapperdao.IUserMapper;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MapperSelection {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("classpath:data_control\\dao.xml");
//        IAddressMapper bean = context.getBean(IAddressMapper.class);
//        List<AddressInfo> addressInfos = bean.selectAll();
//        System.out.println(addressInfos);
//        AddressInfo addressInfo = bean.selectByPrimaryKey(3L);
//        System.out.println(addressInfo);
//        ICourseMapper bean = context.getBean(ICourseMapper.class);
//        List<CourseInfo> courseInfos = bean.selectAll();
//        System.out.println(courseInfos);
//        IDepartmentMapper bean = context.getBean(IDepartmentMapper.class);
//        System.out.println(bean.selectAll());
//        ILimitsMapper bean1 = context.getBean(ILimitsMapper.class);
//        System.out.println(bean1.selectAll());
//        IUserCourseMapper bean2 = context.getBean(IUserCourseMapper.class);
//        System.out.println(bean2.selectAll());

        IUserMapper bean = context.getBean(IUserMapper.class);
        System.out.println(bean.selectAll());
        context.close();
    }
}
